if (G_IS_PARAM_SPEC_OBJECT (prop->pspec) &&
(G_PARAM_SPEC_VALUE_TYPE (prop->pspec) != GDK_TYPE_PIXBUF))
{
- GObject *object = gtk_builder_get_object (builder, prop->data);
+ GObject *object = gtk_builder_get_object (builder, prop->text->str);
if (object)
{
{
g_warning ("Failed to get construct only property "
"%s of %s with value `%s'",
- prop->pspec->name, object_name, prop->data);
+ prop->pspec->name, object_name, prop->text->str);
continue;
}
/* Delay setting property */
property = g_slice_new (DelayedProperty);
property->pspec = prop->pspec;
property->object = g_strdup (object_name);
- property->value = g_strdup (prop->data);
+ property->value = g_strdup (prop->text->str);
property->line = prop->line;
property->col = prop->col;
builder->priv->delayed_properties =
continue;
}
}
- else if (prop->bound && (!prop->data || *prop->data == '\0'))
+ else if (prop->bound && (!prop->text || prop->text->len == 0))
{
/* Ignore properties with a binding and no value since they are
* only there for to express the binding.
continue;
}
else if (!gtk_builder_value_from_string (builder, prop->pspec,
- prop->data, ¶meter.value, &error))
+ prop->text->str, ¶meter.value, &error))
{
g_warning ("Failed to set property %s.%s to %s: %s",
- g_type_name (object_type), prop->pspec->name, prop->data,
+ g_type_name (object_type), prop->pspec->name, prop->text->str,
error->message);
g_error_free (error);
error = NULL;
static void
free_property_info (PropertyInfo *info)
{
- g_free (info->data);
+ g_string_free (info->text, TRUE);
g_free (info->context);
- /* info->text is already freed */
g_slice_free (PropertyInfo, info);
}
g_string_assign (prop_info->text, translated);
}
- prop_info->data = g_string_free (prop_info->text, FALSE);
-
object_info->properties = g_slist_prepend (object_info->properties, prop_info);
}
else